package com.yidu.user.controller;

import com.yidu.user.entity.User;
import com.yidu.user.service.UserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 *用户控制器
 * @author  sunny
 */
@Api(description = "Restful风格的商品接口")
@RestController
public class UserController {
    @Resource
    UserService userService;

    @GetMapping("/selectUser")
    @ResponseBody
    public HashMap selectUser(){
        List<User> userList =  userService.selectUser();
        HashMap userMap=new HashMap();
        System.out.println("戴言露");
        userMap.put("count",10);
        userMap.put("code",0);
        userMap.put("msg","");
        userMap.put("data",userList);

        System.out.println("我是詹颖");
        System.out.println("我是邓威");
        System.out.println("SB李勇");
        System.out.println("谢贺宇");
        System.out.println("徐灵杰");
        System.out.println("SB鸡哥");
        System.out.println("李勇");
        System.out.println("李逸辰");
        System.out.println("社会大姐符海燕");
        System.out.println("肖强权");
        System.out.println("邓志宸");
        System.out.println("肖理");
        System.out.println("满背姐夫海燕");
        System.out.println("chenjia");
        System.out.println("李文君");
        System.out.println("向晋源fw");
        System.out.println("wwww");
        System.out.println("许木叶");
        System.out.println("肖梓涛");
        System.out.println("宫廷玉液酒");
        System.out.println("一百八一杯");
        System.out.println("hhhhhhhh");
        System.out.println("肖强权");
        System.out.println("文新宇 ");
        System.out.println("haungying");
        System.out.println("李辅政fw");
        System.out.println("小黑蠢货");
        System.out.println("战马关公身上纹 掌声送给社会姐");
        System.out.println("黑子fw");
        System.out.println("SB");
        System.out.println("鸡你太美");
        System.out.println("刘队长");
        System.out.println("wda");
        System.out.println("rddd");
        System.out.println("oooo");
        System.out.println("周弘宇");
        System.out.println("dsddd");
        System.out.println("龙志斌");
        System.out.println("黑槟榔");
        System.out.println("周弘宇");
        System.out.println("ddwadadw");
        System.out.println("小叶梓鸡");
        System.out.println("huanghu");
        System.out.println("虎狗");
        System.out.println("牛鸡鱼");
        System.out.println("叶鸡");
        return userMap;

    }
    public static void main(String[] args) {
        System.out.println("我来了");
    }
}
